
function changeselect(){
	var item = $("#academySelect").find("option:selected").text();
	$("#academyName").attr('value',item);
	var itemId = $("#academySelect").val();
	$("#academyId").attr('value',itemId);
	$("#classSelect option").remove();
	//查询班级
	 $.ajax({
         type: "get",
         cache: false,
         url: 'admin/gradeClass_queryJsonList.action?gradeClass.academyId='+itemId,
         dataType: "json",
         success: function (result) {
        	 var json= eval(result)["dataList"];
        	 $("#classSelect").append("<option value=''>请选择班级</option>");
        	 $.each(json,function(index,content){
        		 $("#classSelect").append("<option value='"+content.id+"'>"+content.gradeClass+"</option>");
        		 });
        	 	$("#classSelect").append("<option value='0'>无</option>");
         },
         error: function (result) {
           
         }
     }

     );
	
}
function changeselect1(){
	var item = $("#classSelect").find("option:selected").text();
	$("#className").attr('value',item);
}
function branchselect(){
	var item = $("#branchSelect").find("option:selected").text();
	$("#branchName").attr('value',item);
}
function quartersselect(){
	var item = $("#quartersSelect").find("option:selected").text();
	$("#quartersName").attr('value',item);
}
$(function(){
	//查询学院
	$.ajax({
        type: "get",
        cache: false,
        url: 'admin/academy_queryJsonList.action',
        dataType: "json",
        success: function (result) {
       	 var json= eval(result)["dataList"];
       	 $.each(json,function(index,content){
       		$("#academySelect").append("<option value='"+content.id+"'>"+content.academy+"</option>");
       		 });
       	$("#academySelect").append("<option value='0'>无</option>");
        },
        error: function (result) {
          
        }
    }

    );
	//查询部门
	$.ajax({
        type: "get",
        cache: false,
        url: 'admin/branch_queryJsonList.action',
        dataType: "json",
        success: function (result) {
       	 var json= eval(result)["dataList"];
       	 $.each(json,function(index,content){
       		$("#branchSelect").append("<option value='"+content.id+"'>"+content.branchName+"</option>");
       		 });
       	$("#branchSelect").append("<option value='0'>无</option>");
   		
       	
        },
        error: function (result) {
          
        }
    }

    );
	//查询岗位
	$.ajax({
        type: "get",
        cache: false,
        url: 'admin/quarters_queryJsonList.action',
        dataType: "json",
        success: function (result) {
       	 var json= eval(result)["dataList"];
       	 $.each(json,function(index,content){
       		$("#quartersSelect").append("<option value='"+content.id+"'>"+content.quarterName+"</option>");
       		 });
     	$("#quartersSelect").append("<option value='0'>无</option>");
        },
        error: function (result) {
          
        }
    }

    );
	
});